<!DOCTYPE html>
<html>
<head>
    {include file="public/header" /}
</head>
<body>
<div style="padding-bottom:200px" class="layui-form layuimini-form">

    <input type="hidden" name="id" value="{$res.id}" />
    <input type="hidden" name="bizpro_id" value="{$res.bizpro_id}" />
    <input type="hidden" name="advert_type" value="{$cate}" />
    <div class="layui-form-item">
        <label class="layui-form-label required">名称</label>
        <div class="layui-input-block">
            <input type="text"  value="{$res.title}" name="title" lay-verify="required" lay-reqtext="名称不能为空" placeholder="请输入名称"  class="layui-input">
        </div>
    </div>





{if condition="$res.id"}
<div class="layui-form-item">
    <label class="layui-form-label">缩略图</label>
    <input type="hidden" id="imgurlHidden" name="imgurl" value="{$res.imgurl}">
    <div class="layui-input-inline uploadHeadImage">
        <div class="layui-upload-drag" id="headImg">
            <i class="layui-icon"></i>
            <p>点击上传图片，或将图片拖拽到此处</p>
        </div>
    </div>
    <div class="layui-input-inline">
        <div class="layui-upload-list" style="margin-top: 5px;">
            <img class="layui-upload-img headImage" style="height: 100px;" src="{$res.imgsrc}" id="imgurl">
            <p id="demoText"></p>
        </div>
    </div>
</div>
{else}
<div class="layui-form-item">
    <label class="layui-form-label">缩略图</label>
    <input type="hidden" id="imgurlHidden" name="imgurl">
    <div class="layui-input-inline uploadHeadImage">
        <div class="layui-upload-drag" id="headImg">
            <i class="layui-icon"></i>
            <p>点击上传图片，或将图片拖拽到此处</p>
        </div>
    </div>
    <div class="" style="display: flex">
        <div class="layui-upload-list" style="margin-top: 5px;">
            <img class="layui-upload-img headImage" style="height: 100px;" src="" id="imgurl">
            <p id="demoText"></p>
        </div>
        <div class="layui-form-mid layui-word-aux">
            <span class="x-red">*</span>为保证图片质量，缩略图请尽量选择200*200的方形图片,图片大小不要超过500KB,一般在30KB-100KB之间
        </div>
    </div>
</div>
{/if}


    <div class="layui-form-item">
        <label class="layui-form-label required">上下架时间</label>
        <div class="layui-input-block">
            <input type="text" id="start_time" {if condition="$res.start_time"}  value="{$res.start_time} - {$res.end_time}" {else} value="" {/if}  name="start_time" lay-verify="required" lay-reqtext="上架时间不能为空"    class="layui-input">
        </div>
    </div>

<div class="layui-form-item">
    <label class="layui-form-label">关联商品</label>
    <div class="layui-input-block" style="width:100px">
        <input type="checkbox" lay-filter="switchTest" name="bizpro_type" value="{$res.bizpro_type}" {if condition="$res.bizpro_type==1"} value="1" checked  {/if} lay-skin="switch" lay-text="开|关">
    </div>
</div>


<div id="bizpro_type" {if condition="! $res.id || $res.bizpro_type==2"} style="display: none"  {/if}>

<div class="layui-form-item additem" {if condition="$res.bizpro_id!=0"}  style="display:none;"{else} style="margin-left:35px"{/if}>
<label class="layui-form-label required">添加商品</label>
<div class="layui-input-block">
    <button type="button"  onclick="additem()" class="layui-btn" >添加</button>
</div>
</div>
{if condition="$res.bizpro_id!=0"}
<table class="layui-table"   style="width:80%;margin-left: 150px;">
    <colgroup>
        <col width="150">
        <col width="200">
        <col width="200">
        <col width="150">
    </colgroup>
    <thead>
    <tr>
        <th>名称</th>
        <th>售价</th>
        <th>商品编号</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>

    <tr>
        <td>{$res.bizpro_name}</td>
        <td>{$res.bizpro_status_price}</td>
        <td>{$res.bizpro_status_number}</td>
        <td><button type="button"  lay-event="additem"  class="layui-btn additem">修改</button></td>
    </tr>
    </tbody>
</table>
{/if}
</div>


<!--我的页广告选项 结束-->



<div class="layui-form-item">
    <div class="layui-input-block">
        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
    </div>
</div>

</div>
{include file="public/footer" /}
<script src="/static/admin/adverbanner/saveinfo_index.js?v={$Think.const.TIMESTAMP}" charset="utf-8"></script>

</body>
</html>